import React from "react";
import {Button} from 'antd'
import {useNavigate} from 'react-router-dom'
import qs from 'qs'
function PageOne(props) {
    const navigate=useNavigate()
    const handleBtn=()=>{
        const obj={id:'123',name:'qwe'}
       navigate({pathname:'/other/pagethree',search:qs.stringify({id:'123',name:'qwe'})})
    // navigate("/mall/xq",{ state: {name: '测试', keyWords: '传参'} })
    // navigate(`/mall/xq?${qs.stringify(obj)}`)
    }
    return (
        <div>
            PageOne页面
            <Button type="primary" onClick={()=>{handleBtn()}}>按钮</Button>
        </div>
    )
}
export default PageOne